#!/usr/bin/env python
# encoding: utf-8
# @author: qiaowei
# @license: (C) Copyright 2013-2019
# @contact: weiweiqiao@126.com
# @file: information_module.py
# @time: 2020/6/20
# @desc: 每个频率的信息，包括扇区、主备情况；频率；是否互调；互调频率（后两个信息在互调计算时生效）


class Information:
    def __init__(self, sector_information: str = '', frequency: float = 0):
        """
        频率信息项，共含4个数据项：扇区信息、频率、是否互调、互调频率。其中是否互调、互调频率数据项由系统初始化
        :param sector_information: 扇区，主备频等备注信息
        :param frequency: 频率
        """
        self.__sector_information = sector_information
        self.__frequency = frequency
        self.__inter_modulation = False
        self.__inter_modulation_frequency = 0

    def get_count(self):
        return 4

    @property
    def sector_information(self):
        return self.__sector_information

    @property
    def frequency(self):
        return self.__frequency

    @property
    def inter_modulation(self):
        return self.__inter_modulation

    @inter_modulation.setter
    def inter_modulation(self, value: bool):
        self.__inter_modulation = value

    @property
    def inter_modulation_frequency(self):
        return self.__inter_modulation_frequency

    @inter_modulation_frequency.setter
    def inter_modulation_frequency(self, value: float):
        self.__inter_modulation_frequency = value
